export const buildAvueCrudConfig = ({ columns = [] }) => {
	const enhancedColumns = columns.map((column) => ({
		...column,
		sortable: false, // 默认关闭排序
	}))

	return {
		submitBtn: false,
		emptyBtn: false,
		selection: false,
		selectionWidth: 100,
		excelBtn: true,
		border: true,
		index: false,
		expandLevel: 3,
		headerAlign: 'left',
		align: 'left',
		tree: true,
		rowKey: 'id',
		labelWidth: 100,
		reserveSelection: true,
		refreshBtn: false,
		excelBtn: false,
		printBtn: false,
		searchShowBtn: false,
		columnBtn: false,
		addBtn: false,
		gridBtn: false,
		copyBtn: false,
		filterBtn: false,
		menu: false,
		column: enhancedColumns, // 使用增强后的列配置
	}
}
